package com.hl.toolkit.server.tycoin.account.slaverepository;

import com.tycoin.account.slaveentity.TycoinAccountLog;
import com.tycoin.common.repository.AbstractRepository;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


@Repository
@CacheConfig(cacheNames = "com.tycoin.account.slaverepository.tycoinAccountLogRepository")
public interface TycoinAccountLogRepository extends AbstractRepository<TycoinAccountLog, Long> {

	
	@Query(" select t from TycoinAccountLog t where t.userId = :userId  order by t.createTime DESC ")
	Page <TycoinAccountLog> queryByPage(@Param("userId") Long userId, Pageable pageable);
	
 	
 	TycoinAccountLog findOneBylogno(String logno);
}

 
